package org.xm.sk.vo.ob;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@ApiModel(value = "HairdresserInfo", parent = LocalHairdresserList.class, description = "发型师详细信息")
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
public class HairdresserInfo extends LocalHairdresserList {

    @ApiModelProperty(value = "所属门店地址")
    String shopAddress;

    @ApiModelProperty(value = "门店与用户之间的距离")
    Double distance;

    @ApiModelProperty(value = "发型师作品展示图片ID集")
    Set<WorksInfo> WorksInfos = new HashSet<WorksInfo>(0);

    @ApiModelProperty(value = "发型师备注")
    String memo;

    @ApiModelProperty(value = "发型师手机号")
    @Transient
    private String phone;
    
    public void setDistance(Double distance) {
        this.distance = Double.parseDouble(String.format("%.2f", distance));
    }

}